package com.jspgou.cms.entity.base;

import java.io.Serializable;


/**
 * This is an object that contains data related to the jc_store table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="jc_store"
 */

public abstract class BaseStore  implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	public static String REF = "Store";
	public static String PROP_FORBIDDEN = "forbidden";
	public static String PROP_RECOMMEND = "recommend";
	public static String PROP_MEMBER = "member";
	public static String PROP_CATEGORY = "category";
	public static String PROP_EXAMINE = "examine";
	public static String PROP_ID = "id";
	public static String PROP_SORT_DATE = "sortDate";
	public static String PROP_STORE_EXT = "storeExt";
	public static String PROP_CREATE_DATE = "createDate";
	public static String PROP_STORE_MODEL = "storeModel";
	public static String PROP_MODELPERMISSION = "modelpermission";
	public static String PROP_PRIORITY = "priority";


	// constructors
	public BaseStore () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseStore (java.lang.Long id) {
		this.setId(id);
		initialize();
	}

	/**
	 * Constructor for required fields
	 */
	public BaseStore (
		java.lang.Long id,
		com.jspgou.cms.entity.ShopMember member,
		com.jspgou.cms.entity.StoreModel storeModel,
		java.util.Date createDate,
		java.util.Date sortDate,
		java.lang.Integer priority,
		java.lang.Boolean recommend,
		java.lang.Boolean forbidden,
		java.lang.Boolean modelpermission,
		java.lang.Boolean examine) {

		this.setId(id);
		this.setMember(member);
		this.setStoreModel(storeModel);
		this.setCreateDate(createDate);
		this.setSortDate(sortDate);
		this.setPriority(priority);
		this.setRecommend(recommend);
		this.setForbidden(forbidden);
		this.setModelpermission(modelpermission);
		this.setExamine(examine);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.Long id;

	// fields
	private java.util.Date createDate;
	private java.util.Date sortDate;
	private java.lang.Integer priority;
	private java.lang.Boolean recommend;
	private java.lang.Boolean forbidden;
	private java.lang.Boolean modelpermission;
	private java.lang.Boolean examine;

	// one to one
	private com.jspgou.cms.entity.StoreExt storeExt;

	// many to one
	private com.jspgou.cms.entity.Category category;
	private com.jspgou.cms.entity.ShopMember member;
	private com.jspgou.cms.entity.StoreModel storeModel;
	private com.jspgou.core.entity.Website website;

	// collections
	private java.util.Set<com.jspgou.cms.entity.ShopMember> members;
	private java.util.Set<com.jspgou.cms.entity.FullGive> fullGives;
	private java.util.Set<com.jspgou.cms.entity.StoreTxt> storeTxtSet;



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="native"
     *  column="store_id"
     */
	public java.lang.Long getId () {
		return id;
	}

	/**
	 * Set the unique identifier of this class
	 * @param id the new ID
	 */
	public void setId (java.lang.Long id) {
		this.id = id;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: create_date
	 */
	public java.util.Date getCreateDate () {
		return createDate;
	}

	/**
	 * Set the value related to the column: create_date
	 * @param createDate the create_date value
	 */
	public void setCreateDate (java.util.Date createDate) {
		this.createDate = createDate;
	}


	/**
	 * Return the value associated with the column: sort_date
	 */
	public java.util.Date getSortDate () {
		return sortDate;
	}

	/**
	 * Set the value related to the column: sort_date
	 * @param sortDate the sort_date value
	 */
	public void setSortDate (java.util.Date sortDate) {
		this.sortDate = sortDate;
	}


	/**
	 * Return the value associated with the column: priority
	 */
	public java.lang.Integer getPriority () {
		return priority;
	}

	/**
	 * Set the value related to the column: priority
	 * @param priority the priority value
	 */
	public void setPriority (java.lang.Integer priority) {
		this.priority = priority;
	}


	/**
	 * Return the value associated with the column: is_recommend
	 */
	public java.lang.Boolean getRecommend () {
		return recommend;
	}

	/**
	 * Set the value related to the column: is_recommend
	 * @param recommend the is_recommend value
	 */
	public void setRecommend (java.lang.Boolean recommend) {
		this.recommend = recommend;
	}


	/**
	 * Return the value associated with the column: is_forbidden
	 */
	public java.lang.Boolean getForbidden () {
		return forbidden;
	}

	/**
	 * Set the value related to the column: is_forbidden
	 * @param forbidden the is_forbidden value
	 */
	public void setForbidden (java.lang.Boolean forbidden) {
		this.forbidden = forbidden;
	}


	/**
	 * Return the value associated with the column: is_modelpermission
	 */
	public java.lang.Boolean getModelpermission () {
		return modelpermission;
	}

	/**
	 * Set the value related to the column: is_modelpermission
	 * @param modelpermission the is_modelpermission value
	 */
	public void setModelpermission (java.lang.Boolean modelpermission) {
		this.modelpermission = modelpermission;
	}


	/**
	 * Return the value associated with the column: is_examine
	 */
	public java.lang.Boolean getExamine () {
		return examine;
	}

	/**
	 * Set the value related to the column: is_examine
	 * @param examine the is_examine value
	 */
	public void setExamine (java.lang.Boolean examine) {
		this.examine = examine;
	}


	/**
	 * Return the value associated with the column: storeExt
	 */
	public com.jspgou.cms.entity.StoreExt getStoreExt () {
		return storeExt;
	}

	/**
	 * Set the value related to the column: storeExt
	 * @param storeExt the storeExt value
	 */
	public void setStoreExt (com.jspgou.cms.entity.StoreExt storeExt) {
		this.storeExt = storeExt;
	}


	/**
	 * Return the value associated with the column: category_id
	 */
	public com.jspgou.cms.entity.Category getCategory () {
		return category;
	}

	/**
	 * Set the value related to the column: category_id
	 * @param category the category_id value
	 */
	public void setCategory (com.jspgou.cms.entity.Category category) {
		this.category = category;
	}


	/**
	 * Return the value associated with the column: member_id
	 */
	public com.jspgou.cms.entity.ShopMember getMember () {
		return member;
	}

	/**
	 * Set the value related to the column: member_id
	 * @param member the member_id value
	 */
	public void setMember (com.jspgou.cms.entity.ShopMember member) {
		this.member = member;
	}


	/**
	 * Return the value associated with the column: storeModel_id
	 */
	public com.jspgou.cms.entity.StoreModel getStoreModel () {
		return storeModel;
	}

	/**
	 * Set the value related to the column: storeModel_id
	 * @param storeModel the storeModel_id value
	 */
	public void setStoreModel (com.jspgou.cms.entity.StoreModel storeModel) {
		this.storeModel = storeModel;
	}
	
	/**
	 * Return the value associated with the column: website_id
	 */
	public com.jspgou.core.entity.Website getWebsite () {
		return website;
	}

	/**
	 * Set the value related to the column: website_id
	 * @param website the website_id value
	 */
	public void setWebsite (com.jspgou.core.entity.Website website) {
		this.website = website;
	}


	/**
	 * Return the value associated with the column: members
	 */
	public java.util.Set<com.jspgou.cms.entity.ShopMember> getMembers () {
		return members;
	}

	/**
	 * Set the value related to the column: members
	 * @param members the members value
	 */
	public void setMembers (java.util.Set<com.jspgou.cms.entity.ShopMember> members) {
		this.members = members;
	}

	public java.util.Set<com.jspgou.cms.entity.FullGive> getFullGives() {
		return fullGives;
	}

	public void setFullGives(java.util.Set<com.jspgou.cms.entity.FullGive> fullGives) {
		this.fullGives = fullGives;
	}

	/**
	 * Return the value associated with the column: storeTxtSet
	 */
	public java.util.Set<com.jspgou.cms.entity.StoreTxt> getStoreTxtSet () {
		return storeTxtSet;
	}

	/**
	 * Set the value related to the column: storeTxtSet
	 * @param storeTxtSet the storeTxtSet value
	 */
	public void setStoreTxtSet (java.util.Set<com.jspgou.cms.entity.StoreTxt> storeTxtSet) {
		this.storeTxtSet = storeTxtSet;
	}



	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof com.jspgou.cms.entity.Store)) return false;
		else {
			com.jspgou.cms.entity.Store store = (com.jspgou.cms.entity.Store) obj;
			if (null == this.getId() || null == store.getId()) return false;
			else return (this.getId().equals(store.getId()));
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getId()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getId().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}


}